<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<ul id="box">
    <li>frank</li>
    <li>frank</li>
    <li>frank</li>
    <li>frank</li>
</ul>
<script>
   var a = 10;
   var b = 11;
   c = undefined;
   var c = 0 % 2;// 2 余  2
    console.log(c);
    var arr = ['frank','tom','jack','aaa','bbb'];
    var s = '';
    for (var i in arr){
        var colorStr = i%2  ? 'blue':'red';
        console.log(colorStr);
        s = s + '<li style="background-color: '+ colorStr +'">'+ arr[i] +'</li>';
    }
    var o = document.getElementById('box');
    o.innerHTML = s;

</script>
</body>
</html>